import easygui as g

msg = "请填写联系方式"
title = "账号中心"
fieldName = [" *用户名", " *真实姓名", "  固定电话", " *手机号码", "  QQ", " *Email"]
fieldValues = []
fieldValues = g.multenterbox(msg,title,fieldName)

while 1:
    if fieldValues == None:
        break
    errmsg = ""
    for i in range(len(fieldName)):
        option = fieldName[i].strip()
        if fieldValues[i].strip() == "" and option[0] == "*":
            errmsg += ('【%s】为必填项。\n\n' % fieldName[i])
    if errmsg == "":
        break
    fieldValues = g.multenterbox(errmsg, title, fieldName, fieldValues)

print("用户资料如下：%s" % str(fieldValues))

